# Contributor: Anjandev Momi <anjan@momi.ca>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=peanutbutter
pkgver=0.2
pkgrel=0
pkgdesc="A lock screen for linux mobile - specially designed for Sxmo (sway edition)"
url="https://git.sr.ht/~anjan/peanutbutter"
# s390x: build fails on nix dependency
arch="all !s390x"
license="AGPL-3.0-only"
makedepends="cargo cargo-auditable"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~anjan/peanutbutter/archive/$pkgver.tar.gz"
options="!check"

prepare() {
	default_prepare

	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --frozen --release
}

package() {
	install -Dm755 target/release/peanutbutter \
		-t "$pkgdir"/usr/bin/
}

sha512sums="
223bfa7a8be3ce8301809046e6d66749e34eb7ddd2e72425144e58b23b39c52a528fae793f9bfc2aae7a8665d6106a26ff56d8fdf8c4cbd826dfbe09dc29a549  peanutbutter-0.2.tar.gz
"
